<template>
  <div class="category">
    <div class="navbar">
      <van-nav-bar title="分类" @click-right="onClickRight">
        <template #right>
          <van-icon name="search" size="18" />
        </template>
      </van-nav-bar>
    </div>
    <van-sidebar v-model="activeKey">
      <van-sidebar-item title="标签名称" v-for="n in 4" :key="n" />
    </van-sidebar>
  </div>
</template>

<script>
import { Toast } from "vant";
import request from "@/utils/request";
export default {
  name: "Category",
  data() {
    return {
      activeKey: 0,
      list;{}
    };
  },
  created() {
    request.get("/api/shop/category/list").then(data => {
      console.log(data);
    });
  },
  methods: {
    onClickRight() {
      this.$router.push({ path: "/search" });
    }
  },
  computed: {
    title() {
      return this.$route.meta.title || "购物车";
    }
  }
};
</script>

<style lang="less" scoped>
</style>
